import java.awt.Color;
import java.awt.Graphics;
import javax.swing.JPanel;
@SuppressWarnings("serial")
public class ColorPanel extends JPanel
{
	Color col;
	Node r,g,b;
	public ColorPanel(Node red, Node green, Node blue)
	{
		r=red;
		g=green;
		b=blue;
		col=new Color(r.getNode(),g.getNode(),b.getNode());
		setBackground(col);
	}
	public void changeColor()
	{
		col=new Color(r.getNode(),g.getNode(),b.getNode());
		setBackground(col);
		repaint();
	}
	public void paintComponent(Graphics g)
	{
		super.paintComponent(g);
	}
}
